#include <math.h>

#include <cstdio>
#include <iostream>
#include <string>

using namespace std;

class Rectangle {
   private:
    double width, height;

   public:
    Rectangle(double w = 1, double h = 1) : width(w), height(h) {}
    double getWidth() const;
    double getHeight() const;
    void setWidth(double width);
    void setHeight(double height);
    double getArea() const;
    double getPerimeter() const;
};

double Rectangle::getArea() const {
    return width * height;
}

double Rectangle::getHeight() const {
    return height;
}

double Rectangle::getWidth() const {
    return width;
}

double Rectangle::getPerimeter() const {
    return width + width + height + height;
}

void Rectangle::setHeight(double h) {
    height = h;
}

void Rectangle::setWidth(double w) {
    width = w;
}